﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_ManufactureList.cshtml";
}
<style type="text/css">
    .ui-jqgrid .table-bordered th {
        height: 52px !important;
    }
</style>
<script type="text/javascript">
    $(function () {
        initControl();
        gridList();
    });
    function initControl() {
        $('select').bindSelect();
    }
    function gridList() {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            url: "/BOM/Product/GetResourceJson",
            height: $(window).height() - 134,
            colModel: [
                { label: '整车编号', name: 'VEHICLENUMBER', width: 130, align: 'left', frozen: true, sortable: false },
                { label: '车型代号', name: 'VETYPENUMBER', width: 80, align: 'left', frozen: true, sortable: false },
                { label: '产品信函编号', name: 'HT031', width: 120, align: 'center', sortable: false },
                { label: '产品型号', name: 'PRODUCTNUMBER01', width: 150, align: 'left', sortable: false },
                { label: '公告型号', name: 'BULLETINNUMBER', width: 150, align: 'left', sortable: false },
                { label: '车辆名称', name: 'HT001', width: 80, align: 'left', sortable: false },
                { label: '本车对应的<br />其它公告', name: 'HT032', width: 100, align: 'left', sortable: false },
                { label: '内部整车编号', name: 'VARCARPARTNUMBER', width: 130, align: 'left', sortable: false },
                { label: '选加装编号', name: 'XJZBOMNUMBER', width: 160, align: 'left', sortable: false },
                { label: '结构树', name: 'MODNUMBER', width: 100, align: 'left', sortable: false },
                { label: '产品线', name: 'HT002', width: 60, align: 'center', sortable: false },
                { label: '品牌及子品牌', name: 'HT003', width: 100, align: 'left', sortable: false },
                { label: '业务单元', name: 'OPERATIONUNIT', width: 130, align: 'center', sortable: false },
                { label: '驱动型式', name: 'HT004', width: 60, align: 'center', sortable: false },
                { label: '开发类型', name: 'HT041', width: 60, align: 'center', sortable: false },
                { label: '准乘人数', name: 'HT046', width: 80, align: 'left', sortable: false },
                { label: '工况分类', name: 'HT043', width: 90, align: 'left', sortable: false },
                { label: '项目来源', name: 'PROJECTSOURCE', width: 480, align: 'left', sortable: false },
                { label: '项目名称', name: 'HT033', width: 320, align: 'left', sortable: false },
                { label: '整车外形尺寸<br />(长x宽x高,mm)', name: 'CHGCONTENT', width: 130, align: 'center', sortable: false },
                { label: '整车特点概述', name: 'VARISUMMARY', width: 480, align: 'left', sortable: false },
                { label: '驾驶室型式', name: 'HT005', width: 130, align: 'left', sortable: false },
                { label: '车身状态', name: 'HT006', width: 90, align: 'center', sortable: false },
                { label: '内饰', name: 'HT007', width: 80, align: 'center', sortable: false },
                { label: '车身等级代码', name: 'HT0231', width: 90, align: 'center', sortable: false },
                { label: '发动机型号', name: 'ENGTYPE', width: 140, align: 'left', sortable: false },
                { label: '发动机额定功率', name: 'ENGPOWER', width: 120, align: 'left', sortable: false },
                { label: '发动机最大扭矩', name: 'ENGWREST', width: 120, align: 'left', sortable: false },
                { label: '发动机排量', name: 'ENGQUANTUM', width: 80, align: 'center', sortable: false },
                { label: '喷油系统', name: 'HT008', width: 100, align: 'left', sortable: false },
                { label: '排放', name: 'HT010', width: 50, align: 'center', sortable: false },
                { label: '风扇', name: 'HT009', width: 50, align: 'center', sortable: false },
                { label: '发动机备注', name: 'ENGCOMMENT', width: 100, align: 'left', sortable: false },
                { label: '离合器', name: 'CLUTCH', width: 240, align: 'left', sortable: false },
                { label: '离合操纵型式', name: 'CLTCONTROL', width: 150, align: 'left', sortable: false },
                { label: '发动机额定功率<br />(KW)/马力(PS)', name: 'GEARBOX', width: 120, align: 'left', sortable: false },
                { label: '变速操纵型式', name: 'SHIFTCONTROL', width: 120, align: 'left', sortable: false },
                { label: '悬架前型式', name: 'FRONTFRAMETYPE', width: 270, align: 'left', sortable: false },
                { label: '前板簧片数', name: 'FRONTFRAMESLIP', width: 70, align: 'left', sortable: false },
                { label: '悬架后型式', name: 'BACKFRAMETYPE', width: 270, align: 'left', sortable: false },
                { label: '后板簧片数', name: 'BACKFRAMESLIP', width: 70, align: 'left', sortable: false },
                { label: '额定载荷型式/型号', name: 'FRONTBRIDGELOAD', width: 130, align: 'left', sortable: false },
                { label: '前桥制动器型式', name: 'HT011', width: 90, align: 'center', sortable: false },
                { label: '转向器型号', name: 'REDIRECTORNO', width: 80, align: 'left', sortable: false },
                { label: '车架外宽', name: 'FRAMEWIDTH', width: 80, align: 'left', sortable: false },
                { label: '纵梁截面', name: 'FRAMESECTION', width: 150, align: 'left', sortable: false },
                { label: '后桥型号/型式', name: 'HT042', width: 150, align: 'left', sortable: false },
                { label: '桥壳型式', name: 'HT034', width: 70, align: 'center', sortable: false },
                { label: '额定载荷/主速比', name: 'HT035', width: 90, align: 'center', sortable: false },
                { label: '后桥制动器型式', name: 'HT036', width: 90, align: 'center', sortable: false },
                { label: '制动行车制动', name: 'OVZDXCZD', width: 100, align: 'left', sortable: false },
                { label: '驻车制动', name: 'BRAKE', width: 120, align: 'left', sortable: false },
                { label: '辅助制动', name: 'ASSISBRAKE', width: 130, align: 'left', sortable: false },
                { label: '制动ABS', name: 'ABS', width: 180, align: 'left', sortable: false },
                { label: '从动桥额定载荷<br />型号/型式', name: 'CONGDONGQIAO', width: 100, align: 'left', sortable: false },
                { label: '从动桥制动器型式', name: 'ZHIDONGQI', width: 110, align: 'left', sortable: false },
                { label: '轮胎', name: 'TIRE', width: 240, align: 'left', sortable: false },
                { label: '驾驶室悬置型式', name: 'HT012', width: 100, align: 'left', sortable: false },
                { label: '驾驶室举升型式', name: 'HT013', width: 80, align: 'center', sortable: false },
                { label: '座椅型式', name: 'HT014', width: 80, align: 'center', sortable: false },
                { label: '后视镜玻璃升降器型式', name: 'HT015', width: 110, align: 'center', sortable: false },
                { label: '中控锁', name: 'HT016', width: 60, align: 'center', sortable: false },
                { label: '倒车雷达', name: 'HT017', width: 60, align: 'center', sortable: false },
                { label: '侧裙板', name: 'HT018', width: 60, align: 'center', sortable: false },
                { label: '工作走台', name: 'HT019', width: 60, align: 'center', sortable: false },
                { label: '工作走台', name: 'HT020', width: 140, align: 'left', sortable: false },
                { label: '空滤器型式', name: 'HT021', width: 80, align: 'center', sortable: false },
                { label: '消声器型式', name: 'HT022', width: 80, align: 'center', sortable: false },
                { label: '速比', name: 'HT0241', width: 80, align: 'left', sortable: false },
                { label: '选用装置ABS', name: 'HT037', width: 90, align: 'center', sortable: false },
                { label: '选用装置空调', name: 'HT0251', width: 90, align: 'left', sortable: false },
                { label: '选用装置空调', name: 'HT0261', width: 90, align: 'left', sortable: false },
                { label: '选装喷油系统', name: 'HT0271', width: 90, align: 'left', sortable: false },
                { label: '选装GPRS', name: 'HT0281', width: 90, align: 'center', sortable: false },
                { label: '加装鞍座', name: 'HT0291', width: 90, align: 'center', sortable: false },
                { label: '加装导流罩', name: 'HT0301', width: 80, align: 'center', sortable: false },
                { label: '选装轮胎', name: 'HT0381', width: 80, align: 'center', sortable: false },
                { label: '选装上装', name: 'HT0391', width: 80, align: 'center', sortable: false },
                { label: '整车外形尺寸<br />(长×宽×高)(mm)', name: 'VEHICLESIZE', width: 160, align: 'left', sortable: false },
                { label: '底盘外形尺寸<br />(长×宽×高)(mm)', name: 'CHASSISSIZE', width: 160, align: 'left', sortable: false },
                { label: '货箱内部尺寸<br />(长×宽×高)(mm)', name: 'CONTAINERSIZE', width: 160, align: 'left', sortable: false },
                { label: '轴距(mm)', name: 'AXIESDISTANCE', width: 100, align: 'left', sortable: false },
                { label: '轮距(前/后)(mm)', name: 'TURNDISTANCE', width: 150, align: 'left', sortable: false },
                { label: '最高车速(km/h)', name: 'MAXSPEED', width: 180, align: 'left', sortable: false },
                { label: '最大爬坡度()', name: 'HT044', width: 130, align: 'left', sortable: false },
                { label: '整车整备质量(kg)', name: 'FITOUTQUALITY', width: 120, align: 'right', sortable: false },
                { label: '底盘整备质量(kg)', name: 'CHASSISQUALITY', width: 120, align: 'right', sortable: false },
                { label: '设计(鞍)载质量(kg)', name: 'RATINGQUALITY', width: 120, align: 'right', sortable: false },
                { label: '最大设计总质量(kg)', name: 'MAXMASS', width: 120, align: 'right', sortable: false },
                { label: '承载人数(人)', name: 'RIDEPERSONS', width: 80, align: 'left', sortable: false },
                { label: '准拖挂车总质量(kg)', name: 'RAGMASS', width: 110, align: 'right', sortable: false },
                { label: '该出口车前八位VIN代码', name: 'HT040', width: 130, align: 'center', sortable: false },
                { label: '设计参数补充说明', name: 'HT045', width: 480, align: 'left', sortable: false },
                { label: '备注', name: 'NOTE', width: 480, align: 'left', sortable: false },
                { label: '导入文件名称', name: 'FileName', width: 120, align: 'left', sortable: false },
                { label: '创建人员', name: 'FCreateBy', width: 80, align: 'left', sortable: false },
                { label: '创建日期', name: 'FCreateDate', width: 70, align: 'center', sortable: false },
                { label: '创建时间', name: 'FCreateTime', width: 70, align: 'center', sortable: false },
                { label: '更改人员', name: 'FUpdateBy', width: 80, align: 'left', sortable: false },
                { label: '更改日期', name: 'FUpdateDate', width: 70, align: 'center', sortable: false },
                { label: '更改时间', name: 'FUpdateTime', width: 70, align: 'center', sortable: false }
            ],
            postData: { keyword: $("#txt_keyword").val(), keyword2: $("#txt_keyword2").val(), keyword3: $("#txt_keyword3").val(), keyword4: $("#txt_keyword4").val() },
            pager: "#gridPager",
            sortname: 'VEHICLENUMBER',
            sortorder: "desc",
            rowNum: 50, //每页显示记录数  
            rowList: [50, 100, 200], //可调整每页显示的记录数  
            viewrecords: true,  //是否显示行数
            rownumWidth: 40
        });
        $gridList.jqGrid('setLabel', 0, '序号', 'rowNumberHeaderStyle');
        $gridList.jqGrid('setFrozenColumns');
        $("#btn_search").click(function () {
            var postdate = { keyword: $("#txt_keyword").val(), keyword2: $("#txt_keyword2").val(), keyword3: $("#txt_keyword3").val(), keyword4: $("#txt_keyword4").val() };
            //var cookie_date = JSON.stringify(postdate)
            //var cookietime = new Date();
            //cookietime.setTime(new Date().getTime() + (60 * 60 * 1000));//coockie保存一小时 
            //$.cookie("bom_resource_cookie_tmp", cookie_date, { expires: cookietime });
            $gridList.jqGrid('setGridParam', {
                postData: postdate,
            }).trigger('reloadGrid');
        });
    }
</script>
<div id="layout" style="height: 100%; width: 100%;">
    <form id="form1">
        <div style="padding: 12px 0 5px 0; padding-left: 15px; border-bottom: 1px solid #ccc; " class="line-table input-width-140">
            <div class="btn-group" style="margin-top:-9px;">
                整车编号<br /><input id="txt_keyword" name="" type="text" class="form-control" /> &nbsp;
            </div>
            <div class="btn-group" style="margin-top:-9px;">
                车型代号<br /><input id="txt_keyword2" name="" type="text" class="form-control input-width-105" /> &nbsp;
            </div>
            <div class="btn-group" style="margin-top:-9px;">
                产品信函编号<br /><input id="txt_keyword3" name="" type="text" class="form-control" /> &nbsp;
            </div>
            <div class="btn-group" style="margin-top:-9px;">
                产品型号<br /><input id="txt_keyword4" name="" type="text" class="form-control" /> &nbsp;
            </div>
            <div class="btn-group" style="">
                <a id="btn_search" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-search"></span> 检索</a>
            </div>
            <div class="btn-group" style="float:right;">
                <a id="" class="btn btn-primary center-block" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span> 刷新</a>
                <a id="" class="btn btn-primary center-block disabled" onclick=""><span class="glyphicon glyphicon-download"></span> 导出</a>
            </div>
        </div>
    </form>
    <div style="">
        <table id="gridList"></table>
        <div id="gridPager"></div>
    </div>
</div>

